﻿
//自定义保存方法
var fnCustomSave = function () {
    var url = "AjaxData/CustomOperating.aspx";
    var action = "procedure";
    //初始化相关参数
    setValue();
    $("#jsonDataContent").val($.toJSON(instance[0]));
    var SaveUrl = url + "?r=" + Math.random() + "&entity=" + entity + "&action=" + action + "&json=" + encodeURI($("#jsonDataContent").val().replace(/&/g, "[A]").replace(/'/g, "[B]"));
    if (typeof (checkData) == "function") {
        if (checkData() == "0") {
            return;
        }
    }
    //调用验证
    if (typeof (fnCheckData) == "function") {
        var msg = fnCheckData(instance[0]);
        if (!msg == "") {
            alert(msg);
            return;
        }
    }
    //发送保存请求
    YAHOO.util.Connect.asyncRequest('POST', SaveUrl, {
        success: responseSuccess,
        failure: responseFailure
    }, null);
}